#include"MyList.h"
#include<iostream>
#include<algorithm>
using namespace MyL;
using namespace MyRI;
using std::cout;
using std::endl;
void text1()
{
  list<int> l;
  int a = 1;
  l.push_back(a);
  l.push_back(a*2);
  l.push_back(a*3);
  l.push_back(a*4);
  l.push_back(1);
  l.push_back(2);
  l.push_back(3);
  l.push_back(4);
  l.push_back(5);
  l.push_back(6);
  MyL::list<int>::iterator pos = l.begin();
  pos++;
  l.insert(pos,100);
  pos = l.end();
  pos--;
  l.erase(pos);
  for(MyL::list<int>::iterator it = l.begin();it != l.end();it++)
  {
    cout << (*it) << " ";
  }
  cout << endl;
  for(MyL::list<int>::reverse_iterator rit = l.rbegin();rit != l.rend();++rit)
  {
    cout << (*rit) << " ";
  }
  cout << endl;
}
int main()
{
  text1();
  return 0;
}
